<?php
session_start();
ob_clean();
if(empty($_SESSION['taal'])) {
	session_destroy();
		Header( "HTTP/1.1 301 Moved Permanently" );
		 
		Header( "Location: login.php" ); 
}
include('top.php');
if($_SESSION['login'] > "0") {
	session_destroy(); 
	Header( "HTTP/1.1 301 Moved Permanently" );
	Header( "Location: login.php" );  }
echo "<br /><h2><div style='text-align: center'> $updb[$taal] Vanzeveren</div></h2>";
require_once('pasmy/dbwaarden.php');

echo "<br><br>";
$mysql_id = mysql_connect($dbhost, $dbuser, $dbpass);
mysql_select_db($db, $mysql_id);

if(isset($_POST["update"])){
	
	$maal = $_POST["eigproc"]/100; $procenten=$_POST["eigproc"];

$sql="Select * FROM vnzvrn";
$res = mysql_query($sql, $mysql_id);
	while ($row = mysql_fetch_row($res)) {
		$row1 = number_format($row[1] + ($row[1]*$maal),2);
		$row2 = number_format($row[2] + ($row[2]*$maal),2);
		$row3 = number_format($row[3] + ($row[3]*$maal),2);
		$row4 = number_format($row[4] + ($row[4]*$maal),2);
		$row5 = number_format($row[5] + ($row[5]*$maal),2);
		$row6 = number_format($row[6] + ($row[6]*$maal),2);
		$row7 = number_format($row[7] + ($row[7]*$maal),2);
		$row8 = number_format($row[8] + ($row[8]*$maal),2);
		$row9 = number_format($row[9] + ($row[9]*$maal),2);
		$row10 = number_format($row[10] + ($row[10]*$maal),2);
		$row11 = number_format($row[11] + ($row[11]*$maal),2);
		$row12 = number_format($row[12] + ($row[12]*$maal),2);
		$row13 = number_format($row[13] + ($row[13]*$maal),2);
		$row14 = number_format($row[14] + ($row[14]*$maal),2);
		$row15 = number_format($row[15] + ($row[15]*$maal),2);
		$row16 = number_format($row[16] + ($row[16]*$maal),2);
		$row17 = number_format($row[17] + ($row[17]*$maal),2);
		$row18 = number_format($row[18] + ($row[18]*$maal),2);
		$row19 = number_format($row[19] + ($row[19]*$maal),2);
		$row20 = number_format($row[20] + ($row[20]*$maal),2);
		
		
		$sql2 = "UPDATE vnzvrn SET pal1=$row1,pal2=$row2,pal3=$row3,pal4=$row4,pal5=$row5,
			pal6=$row6,pal7=$row7,pal8=$row8,pal9=$row9,pal10=$row10,
			pal11=$row11,pal12=$row12,pal13=$row13,pal14=$row14,pal15=$row15,
			pal16=$row16,pal17=$row17,pal18=$row18,pal19=$row19,pal20=$row20 where km = '$row[0]'";
		//echo "sql2 = $sql2<br>";
		$res2 = mysql_query($sql2, $mysql_id);
	
		
	}

$nieuweprijs = (100 * $maal)+ 100;

?>

<br /><br /><br />
<strong><div style="text-align: center"><?php echo "$werdenverhoogd[$taal]" . "&nbsp;" . "$procenten";?>%</div></strong>
<br /><br /><br />



<?php
}
include('footer.php');
?>